import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { viteMockServe } from 'vite-plugin-mock'
import {resolve} from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(),viteMockServe()],
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src'),
      "~/": `${resolve(__dirname, "src")}/`,
    },
    extensions:['.ejs','.js','.vue','.css','.json','.sass','.ts','.scss','.jsx']
  },
  esbuild: {
    jsxFactory: 'h',
    jsxFragment: 'Fragment'
  },
  define: {
    'process.env': {}
  },
  server:{
    host:'0.0.0.0',
    port:3000
  }
})
